﻿namespace RestaurantMenu.Library
{
    using System;

    public class InvalidRangeException<T> : ApplicationException
    {
        // fields
        private T minRange;
        private T maxRange;

        // constructors
        public InvalidRangeException(string message, T min, T max)
            : base(message)
        {
            this.MinRange = min;
            this.MaxRange = max;
        }

        public InvalidRangeException(string message, T min, T max, Exception innerException)
            : base(message, innerException)
        {
            this.MinRange = min;
            this.MaxRange = max;
        }

        // properties
        public T MinRange
        {
            get { return this.minRange; }
            set { this.minRange = value; }
        }

        public T MaxRange
        {
            get { return this.maxRange; }
            set { this.maxRange = value; }
        }
    }
}